package com.ysalliance.getFan.organization.adapter;


import android.widget.ImageView;

import com.blankj.utilcode.util.Utils;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ysalliance.getFan.organization.Bean.UserBean;
import com.ysalliance.getFan.organization.R;

import java.util.List;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class ManagerAdminAdapter extends BaseQuickAdapter<UserBean, BaseViewHolder> {

    public ManagerAdminAdapter(int layoutResId, @Nullable List<UserBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, UserBean item) {
        helper.setText(R.id.tv_name,  item.getUsername() );

        ImageView img_avator = (ImageView)helper.getView(R.id.img_avator);
        Glide.with(Utils.getApp()).load(item.getUser_pic()).into(img_avator);

        if(helper.getAdapterPosition()==0){
            helper.setVisible(R.id.view_tag,false);
        }

        helper.addOnClickListener(R.id.tv_add);

    }
}


